package com.maserb.monitor.dataCenter.communication;

public enum EigenWarningStatusEnum {
    NORMAL(0, "正常"), ALERT(1, "报警"), DANGER(2, "危险");

    private int value;
    private String name;

    EigenWarningStatusEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public boolean equals(EigenWarningStatusEnum item) {
        return this.getValue() == item.getValue() && this.getName().equals(item.getValue());
    }

    public static EigenWarningStatusEnum getIndex(int index) {
        return values()[index];
    }

    @Override
    public String toString() {
        return String.valueOf(value);
    }
}
